/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ipti.br.tag.bo;

import org.ipti.br.tag.dao.ZipcodeFacade;
import org.ipti.br.tag.entity.Zipcode;
import java.util.List;
import javax.inject.Inject;
import javax.ejb.Stateless;

/**
 *
 * @author israel
 */
@Stateless
public class ZipcodeBO {

    @Inject
    private ZipcodeFacade zipcodeDAO;

    public ZipcodeFacade getZipcodeDAO() {
        return zipcodeDAO;
    }

    public void create(Zipcode zipcode) {
        getZipcodeDAO().create(zipcode);
    }

    public void edit(Zipcode zipcode) {
        getZipcodeDAO().edit(zipcode);
    }

    public void remove(Zipcode zipcode) {
        getZipcodeDAO().remove(zipcode);
    }

    public Zipcode find(Object id) {
        return getZipcodeDAO().find(id);
    }

    public List<Zipcode> findAll() {
        return getZipcodeDAO().findAll();
    }

    public List<Zipcode> findAllOrder() {
        return getZipcodeDAO().findAllOrder();
    }
    
    public Zipcode searchByCode(int code) {
        return getZipcodeDAO().searchByCode(code);
    }
}
